/*
 * Copyright 2008-2010 Daniel Cachapa <cachapa@gmail.com>
 * 
 * This program is distributed under the terms of the GNU General Public License Version 3
 * The license can be read in its entirety in the LICENSE.txt file accompanying this source code,
 * or at: http://www.gnu.org/copyleft/gpl.html
 * 
 * This file is part of Libra.
 *
 * WeightWatch is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * WeightWatch is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the WeightWatch source code. If not, see: http://www.gnu.org/licenses
 */

package net.cachapa.libra.component;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.view.View;

public class ChartView extends View {
	private int counter = 0;
	
	public ChartView(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}
	
	@Override
	protected void onDraw(Canvas canvas) {
		RectF rect = new RectF(0, 0, getWidth(), getHeight());
		Paint backgroundPaint = new Paint();
		backgroundPaint.setColor(0xffff6666);
		backgroundPaint.setAntiAlias(true);
		canvas.drawRoundRect(rect, 10, 10, backgroundPaint);
		Paint textPaint = new Paint();
		textPaint.setAntiAlias(true);
		canvas.drawText(counter++ + "", getWidth()/2, getHeight()/2, textPaint);
	}
	
	
}
